package com.aihna.common.pay.domain.bo;

import com.aihna.common.core.validate.AddGroup;
import com.aihna.common.core.validate.EditGroup;
import com.aihna.common.mybatis.core.domain.BaseEntity;
import com.aihna.common.pay.domain.SysPaymentChannel;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;

/**
 * 支付渠道业务对象 sys_payment_channel
 *
 * @author Joseph.Chen
 * @date 2024-03-09
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SysPaymentChannel.class, reverseConvertGenerate = false)
public class SysPaymentChannelBo extends BaseEntity {

    /**
     * 配置id
     */
    @NotNull(message = "配置id不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 渠道编码
     */
    @NotBlank(message = "渠道编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String code;

    /**
     * 渠道费率，单位：百分比
     */
    @NotNull(message = "渠道费率，单位：百分比不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal feeRate;

    /**
     * 应用编号
     */
    @NotNull(message = "应用编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long appId;

    /**
     * 1为正常，0为禁止
     */
    @NotNull(message = "1为正常，0为禁止不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer status;

    /**
     * 支付渠道配置
     */
    @NotBlank(message = "支付渠道配置不能为空", groups = { AddGroup.class, EditGroup.class })
    private String config;

    /**
     * 说明
     */
    private String description;


}
